const joi = require('joi')

const phone = joi.number().integer().min(11).max(11)

const email = joi.string().email()

const old = joi.string().pattern(/^[\S]{6,12}/)

// @ts-ignore
const pass = joi.not(joi.ref('old')).concat(old)

const checkPass = joi.ref('pass')

// 定义用户修改信息
exports.bigAdmin_schema = {
    body: {
        phone,
        email,
    }
}

exports.bigAdminPwd_schema = {
    body: {
        old, pass, checkPass
    }
}